-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[dagster-airlift][jobs 6/n] jobs UI #29278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dagster-airlift][jobs 6/n] jobs UI #29278
Conversation
Deploy preview for dagit-storybook ready! ✅ Preview Built with commit 5431920. |
Deploy preview for dagit-core-storybook ready! ✅ Preview Built with commit 9e9b16f. |
431a600
to
cdf963d
Compare
fb11d75
to
f46d28b
Compare
cdf963d
to
84e01c1
Compare
f46d28b
to
4bb9641
Compare
84e01c1
to
ab1be69
Compare
4bb9641
to
7c45b11
Compare
ab1be69
to
9aad18e
Compare
7c45b11
to
1c6bdac
Compare
@@ -114,7 +114,7 @@ | |||
|
|||
POOL_TAG_PREFIX = f"{HIDDEN_TAG_PREFIX}pool/" | |||
|
|||
EXTERNAL_JOB_SOURCE_TAG_KEY = f"{SYSTEM_TAG_PREFIX}/external_job_source" | |||
EXTERNAL_JOB_SOURCE_TAG_KEY = f"{SYSTEM_TAG_PREFIX}external_job_source" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There appears to be an inconsistency in how the external job source tag key is defined. The current definition:
EXTERNAL_JOB_SOURCE_TAG_KEY = f"{SYSTEM_TAG_PREFIX}external_job_source"
Since SYSTEM_TAG_PREFIX
is defined as "dagster/"
(with a trailing slash), this would create a tag key of "dagster/external_job_source"
.
However, in the frontend code's isExternalRun()
function, it's looking for a tag key named "dagster/external_job_source"
.
This definition is correct, but it's worth noting that there was a duplicate definition later in the file (now removed) that had a different format with a hyphen:
EXTERNAL_JOB_SOURCE_TAG_KEY = f"{SYSTEM_TAG_PREFIX}/external-job-source"
This would have created a tag key of "dagster//external-job-source"
with a double slash and hyphens instead of underscores.
The current implementation is correct, but it's important to ensure consistency in tag naming conventions throughout the codebase.
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
bfa843c
to
71b6fb3
Compare
useEffect(() => { | ||
if (isExternal !== options.isExternal) { | ||
setOptions({...options, isExternal}); | ||
} | ||
return () => {}; | ||
}, [isExternal, options]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dependency array includes the entire options
object, which can lead to unnecessary re-renders since objects are compared by reference. Consider using only the specific property needed for comparison:
useEffect(() => {
if (isExternal !== options.isExternal) {
setOptions({...options, isExternal});
}
return () => {};
}, [isExternal, options.isExternal]);
This ensures the effect only runs when the actual values being compared change.
useEffect(() => { | |
if (isExternal !== options.isExternal) { | |
setOptions({...options, isExternal}); | |
} | |
return () => {}; | |
}, [isExternal, options]); | |
useEffect(() => { | |
if (isExternal !== options.isExternal) { | |
setOptions({...options, isExternal}); | |
} | |
return () => {}; | |
}, [isExternal, options.isExternal]) |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
6f8eda0
to
e8ce65d
Compare
bcc288a
to
2b05e81
Compare
e8ce65d
to
cb63759
Compare
2b05e81
to
4201f3a
Compare
cb63759
to
11e2003
Compare
4201f3a
to
0efd739
Compare
11e2003
to
cb5f767
Compare
0efd739
to
b7d73ec
Compare
cb5f767
to
b127806
Compare
b7d73ec
to
11356b9
Compare
b127806
to
6119436
Compare
b614ed6
to
32c91b8
Compare
6119436
to
6767a37
Compare
32c91b8
to
84307cc
Compare
6767a37
to
ed73075
Compare
## Summary & Motivation Pipes and airlift have kinda the same mandate here to use a well-structured format for defining metadata in an external process, that may not have access to the dagster package. So we can just move the processing code to a shared place accessible to both, and make the language more generic to instead be "external" metadata. ## How I Tested These Changes Existing pipes metadata tests
cf7faa0
into
dpeng817/dpeng817/monitoring_job_real
Summary & Motivation
I bit most of the implementation from #28997. The changes:
How I Tested These Changes
Live against kitchen sink.
Screen Recording 2025-04-23 at 4.01.28 PM.mov (uploaded via Graphite)